package com.example.demo.service;

import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

@Service
public class  UserService {
    @Resource
    private UserMapper userMapper;

    public User getUserByName(String username) {
        return userMapper.getUserByName(username);
    }
    public int register(User user) {
        return userMapper.register(user);
    }
    public User login(User user) {
        return userMapper.login(user);
    }
}
